package com.qfedu.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//请假相关
public class Askforleave {
    private int id ;
    //学生id
    private int sid;
    //开始请假时间
    // 将接收的数据 yyyy-MM-dd hh:mm:ss 转换为 Date  // 转换json 时将 date 转换为 字符串
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存
    private Date startTime;
    //结束时间
    // 将接收的数据 yyyy-MM-dd hh:mm:ss 转换为 Date  // 转换json 时将 date 转换为 字符串
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存
    private Date endTime;
    //请假次数
    private int count;
    //批准
    private String status;
    //请假原因
    private String reason;

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Askforleave() {
    }

    public Askforleave(int id, int sid, Date startTime, Date endTime, int count, String status, String reason, String name) {
        this.id = id;
        this.sid = sid;
        this.startTime = startTime;
        this.endTime = endTime;
        this.count = count;
        this.status = status;
        this.reason = reason;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Askforleave{" +
                "id=" + id +
                ", sid=" + sid +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", count=" + count +
                ", status='" + status + '\'' +
                ", reason='" + reason + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
